<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>销售出库订单信息管理</title>
</head>
	<link rel="stylesheet" type="text/css" href="/wms/js/plugins/jquery-easyui/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="/wms/js/plugins/jquery-easyui/themes/icon.css">
	<script type="text/javascript" src="/wms/js/plugins/jquery-easyui/jquery.min.js"></script>
	<script type="text/javascript" src="/wms/js/plugins/jquery-easyui/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="/wms/js/plugins/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
	<script type="text/javascript" src="/wms/js/common/common.js"></script>
	<script type="text/javascript" src="/wms/js/common/stockOutcomeBill.js"></script>
	<%@include file="/WEB-INF/views/common/page.jsp" %>
<body class="easyui-layout">
	<s:if test="hasActionMessages()">
			<script type="text/javascript">
				var msg = '<s:property value="actionMessages[0]"/>';
				$.messager.alert('操作提示', msg, 'info',function() {
					refreshAllTab();
				});
			</script>
		</s:if>
	<div data-options="region:'north',border:false" style="height: 10%">
		<form id="queryForm" method="post" action="/wms/stockOutcomeBill.action" style="margin-top: 15px">
			<s:hidden name="qo.currentPage"/>
			<s:hidden name="qo.pageSize"/>
			<s:date name="qo.beginDate" format="yyyy-MM-dd" var="bd"/>
			<s:date name="qo.endDate" format="yyyy-MM-dd" var="ed"/>
			业务时间
			<s:textfield name="qo.beginDate" value="%{bd}"/>
			~
			<s:textfield name="qo.endDate" value="%{ed}"/>
			&nbsp; 出库仓库
			<s:select name="qo.depotId" list="#depots" listKey="id" listValue="name" headerKey="-1" headerValue="全部"></s:select>
			&nbsp; 销售客户
			<s:select name="qo.clientId" list="#clients" listKey="id" listValue="name" headerKey="-1" headerValue="全部"></s:select>
			&nbsp; 订单状态
			<s:select name="qo.status" list="#{-1:'全部',0:'未审核',1:'已审核'}"></s:select>
			<a class="easyui-linkbutton" data-options="text:'查询',iconCls:'icon-search'" onclick="query()"></a>
		</form>
	</div>
	<div data-options="region:'south',border: false" style="height: 90%">
		<table id="table_datagrid">
			<thead>
				<tr>
					<th data-options="field:'id',hidden:true"></th>
					<th data-options="field:'sn',align:'center'">订单编号</th>
					<th data-options="field:'vdate',width:1,align:'center'">业务时间</th>
					<th data-options="field:'totalNumber',width:1,align:'center'">总数量</th>
					<th data-options="field:'totalAmount',width:1,align:'center'">总金额</th>
					<th data-options="field:'depot.name',width:1,align:'center'">入库仓库</th>
					<th data-options="field:'client.name',width:1,align:'center'">销售客户</th>
					<th data-options="field:'inputUser.name',width:1,align:'center'">制单人</th>
					<th data-options="field:'auditUser.name',width:1,align:'center'">审核人</th>
					<th data-options="field:'status',width:1,align:'center'">订单状态</th>
					<th data-options="field:'statusId',hidden:true">订单状态</th>
				</tr>
			</thead>
			<tbody>
				<s:iterator value="#objs">
					<tr>
						<td><s:property value="id" /></td>
						<td><s:property value="sn" /></td>
						<td><s:date name="vdate" format="yyyy-MM-dd"/></td>
						<td><s:property value="totalNumber" /></td>
						<td><s:property value="totalAmount" /></td>
						<td><s:property value="depot.name" /></td>
						<td><s:property value="client.name" /></td>
						<td><s:property value="inputUser.name" /></td>
						<td><s:property value="auditor.name" /></td>
						<td>
							<s:if test="status == 0">
								<font color="red">未审核</font>
							</s:if>
							<s:else>
								<font color="green">已审核</font>
							</s:else>
						</td>
						<td><s:property value="status" /></td>
					</tr>
				</s:iterator>
			</tbody>
		</table>

		<div id="dg_tb" style="display: none">
			<a class="easyui-linkbutton" data-options="text:'添加',iconCls:'icon-add',plain:true,onClick:add" data-url="/wms/stockOutcomeBill_input.action"></a>
			<a class="easyui-linkbutton" data-options="text:'编辑/查看',iconCls:'icon-edit',plain:true,onClick:edit"></a>
			<a class="easyui-linkbutton" data-options="text:'删除',iconCls:'icon-remove',plain:true,onClick:remove" 
				data-url="/wms/stockOutcomeBill_delete.action?stockOutcomeBill.id="></a> 
			<a class="easyui-linkbutton" data-options="text:'审核',iconCls:'icon-edit',plain:true,onClick:audit" 
				data-url="/wms/stockOutcomeBill_audit.action?stockOutcomeBill.id="></a> 
			<a class="easyui-linkbutton" data-options="text:'刷新',iconCls:'icon-reload',plain:true,onClick:query"></a>
		</div>
		
	</div>
</body>
</html>
